home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / PTD_TREE.ZIP / SAMPLE-4.POV < prev   
Encoding:
Text File  |  1996-09-19  |  4.6 KB  |  144 lines

  1.  
  2. //------------------------------------------------------------------->
  3. //------------------------------------------------------------------->
  4. //
  5. // "sample-4.pov" - Sample tree for the "ptd_tree" include file.
  6. //
  7. // This demonstrates the use of Branches_On_End_Flag.
  8. //
  9. //------------------------------------------------------------------->
  10. //------------------------------------------------------------------->
  11. //
  12. // Set up a simple scene.
  13.  
  14.         #include "colors.inc"
  15.         #include "textures.inc"
  16.         #include "skies.inc"
  17.         #include "golds.inc"
  18.         #include "stones.inc"
  19.         #include "glass.inc"
  20.  
  21.         #default { finish { Shiny } }
  22.  
  23.         camera { location < 0, 6, -15 > 
  24.         look_at < 0, 9, 0> }
  25.  
  26.         light_source { < -100, 100,    0 > color White shadowless }
  27.         light_source { <    0, 100, -100 > color White shadowless }
  28.         light_source { <  100, 100,    0 > color White shadowless }
  29.  
  30.         background { White }
  31.  
  32.         sky_sphere { pigment { gradient y
  33.                 color_map { [0.0 color Red]
  34.                             [0.5 color Yellow]
  35.                             [1.0 color Green] } } }
  36.  
  37.         plane { y, 0  pigment { MediumAquamarine }  }
  38.  
  39. //------------------------------------------------------------------->
  40. //------------------------------------------------------------------->
  41. //
  42. // Now set all of the variables for the tree. read "ptd_tree.txt" to
  43. // find out what all these things do!
  44.  
  45.         #declare TREE_RAND = seed(0)
  46.         #declare Wiggle_Flag = off
  47.         #declare Branches_On_End_Flag = on
  48.  
  49.         #declare Number_Of_Large_Branches = 1
  50.         #declare Number_Of_Medium_Branches = 1
  51.         #declare Number_Of_Small_Branches = 15
  52.  
  53.         #declare Large_Branch_Minimum_Angle = 20
  54.         #declare Large_Branch_Maximum_Angle = 20
  55.         
  56.         #declare Medium_Branch_Minimum_Angle = 40
  57.         #declare Medium_Branch_Maximum_Angle = 40
  58.         
  59.         #declare Small_Branch_Minimum_Angle = 60
  60.         #declare Small_Branch_Maximum_Angle = 60
  61.  
  62.         #declare Tree_Trunk_Size = 3
  63.  
  64.         #declare Large_Branch_Size_Min = 5
  65.         #declare Large_Branch_Size_Max = 5
  66.  
  67.         #declare Medium_Branch_Size_Min = 4
  68.         #declare Medium_Branch_Size_Max = 4
  69.  
  70.         #declare Small_Branch_Size_Min = 3
  71.         #declare Small_Branch_Size_Max = 3
  72.  
  73.         #declare Leaf_Type = 1
  74.  
  75.         #declare TREE_MESH_SIZE = 300
  76.  
  77.         #declare Leaf_Texture = texture { pigment { Maroon } }
  78.         #declare Bark_Texture = texture { T_Gold_1A }
  79.  
  80. //------------------------------------------------------------------->
  81. //------------------------------------------------------------------->
  82. //
  83. // Now go and build the first tree, then show it.
  84.  
  85.         #include "ptd_tree.inc"
  86.  
  87.         object { Complete_Tree rotate y * -70 translate x * -1 }
  88.  
  89. //------------------------------------------------------------------->
  90. //------------------------------------------------------------------->
  91. //
  92. // Now set all of the variables for the tree. read "ptd_tree.txt" to
  93. // find out what all these things do!
  94.  
  95.         #declare TREE_RAND = seed(0)
  96.         #declare Wiggle_Flag = off
  97.         #declare Branches_On_End_Flag = off
  98.  
  99.         #declare Number_Of_Large_Branches = 1
  100.         #declare Number_Of_Medium_Branches = 1
  101.         #declare Number_Of_Small_Branches = 15
  102.  
  103.         #declare Large_Branch_Minimum_Angle = 20
  104.         #declare Large_Branch_Maximum_Angle = 20
  105.         
  106.         #declare Medium_Branch_Minimum_Angle = 40
  107.         #declare Medium_Branch_Maximum_Angle = 40
  108.         
  109.         #declare Small_Branch_Minimum_Angle = 60
  110.         #declare Small_Branch_Maximum_Angle = 60
  111.  
  112.         #declare Tree_Trunk_Size = 3
  113.  
  114.         #declare Large_Branch_Size_Min = 5
  115.         #declare Large_Branch_Size_Max = 5
  116.  
  117.         #declare Medium_Branch_Size_Min = 4
  118.         #declare Medium_Branch_Size_Max = 4
  119.  
  120.         #declare Small_Branch_Size_Min = 3
  121.         #declare Small_Branch_Size_Max = 3
  122.  
  123.         #declare Leaf_Type = 1
  124.  
  125.         #declare TREE_MESH_SIZE = 300
  126.  
  127.         #declare Leaf_Texture = texture { pigment { Maroon } }
  128.         #declare Bark_Texture = texture { T_Gold_1A }
  129.  
  130. //------------------------------------------------------------------->
  131. //------------------------------------------------------------------->
  132. //
  133. // Now go and build the second tree, then show it.
  134.  
  135.         #include "ptd_tree.inc"
  136.  
  137.         object { Complete_Tree rotate y * -70 translate x * 5 }
  138.  
  139. //------------------------------------------------------------------->
  140. //------------------------------------------------------------------->
  141. //
  142. // End of this file.
  143.  
  144.